package hn.cch;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Test;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;

/**
 * Created by chench on 2020-5-21.
 */
public class Demo {

    private static Log log = LogFactory.getLog(Demo.class);

    @Test
    public void testPlay(){
        AnnotationConfigWebApplicationContext annotationConfigWebApplicationContext =
                new AnnotationConfigWebApplicationContext();
        // annotationConfigWebApplicationContext.register(SpringApplicationContextAware.class);
        // annotationConfigWebApplicationContext.register(JdbcValue.class);
        // annotationConfigWebApplicationContext.refresh();
        //
        // for (int i = 0; i < 1; i++) {
        //
        //     PlayDao playDao = (PlayDao) annotationConfigWebApplicationContext.getBean("playDao");
        //     List<Play> playList = playDao.getAll();
        //
        //     // PlayService playService = (PlayService) ApplicationSinodataSpring.getBean("playService");
        //     // List<Play> playList = playService.getAll();
        //
        //     for (Play play:playList) {
        //         log.info(play.toString());
        //     }
        //     try {
        //         Thread.sleep(1000);
        //     } catch (InterruptedException e) {
        //         e.printStackTrace();
        //     }
        // }


    }
}
